<script setup lang="ts">
const msg = useState<string>("msg");

const { id } = useRoute().params;

const handleDel = async () => {
  await $delete(`/provider/${id}`);
  msg.value = "删除服务商成功";
  navigateTo("/provider");
};
</script>

<template>
  <Confirm @cancel="navigateTo('/provider')" @ok="handleDel"></Confirm>
</template>
